/* 全局样式 */
:root {
  --primary-color: #409EFF;
  --success-color: #67C23A;
  --warning-color: #E6A23C;
  --danger-color: #F56C6C;
  --info-color: #909399;
  --text-primary: #303133;
  --text-regular: #606266;
  --text-secondary: #909399;
  --text-placeholder: #C0C4CC;
  --border-base: #DCDFE6;
  --border-light: #E4E7ED;
  --border-lighter: #EBEEF5;
  --border-extra-light: #F2F6FC;
  --background-base: #F5F7FA;
  --background-light: #FAFAFA;
  --background-lighter: #FFFFFF;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  background-color: var(--background-base);
}

/* 主页面布局 */
.main-layout {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: var(--primary-color);
  color: white;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 18px;
  font-weight: bold;
}

.header-title {
  font-size: 20px;
  font-weight: 600;
}

.header-quote {
  font-size: 12px;
  opacity: 0.9;
  margin-left: 20px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-date {
  font-size: 14px;
  opacity: 0.9;
}

.content-wrapper {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.sidebar {
  width: 250px;
  background: white;
  border-right: 1px solid var(--border-light);
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-nav {
  padding: 10px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--text-regular);
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--background-base);
  color: var(--primary-color);
}

.nav-item.active {
  background: var(--primary-color);
  color: white;
}

.nav-item .icon {
  margin-right: 10px;
  width: 16px;
  height: 16px;
}

.nav-item .arrow {
  margin-left: auto;
  transition: transform 0.3s;
}

.nav-item.expanded .arrow {
  transform: rotate(180deg);
}

.nav-submenu {
  background: var(--background-lighter);
  border-left: 3px solid var(--primary-color);
}

.nav-submenu .nav-item {
  padding-left: 40px;
  font-size: 14px;
}

.main-content {
  flex: 1;
  background: var(--background-base);
  overflow-y: auto;
  padding: 20px;
}

.content-header {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.content-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-item {
  padding: 8px 16px;
  background: white;
  border: 1px solid var(--border-base);
  border-radius: 4px;
  color: var(--text-regular);
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.tab-item:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.tab-item.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.content-body {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-label {
  font-size: 14px;
  color: var(--text-regular);
  white-space: nowrap;
}

.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  background: var(--background-base);
  color: var(--text-primary);
  font-weight: 600;
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--border-lighter);
  color: var(--text-regular);
  white-space: nowrap;
}

.data-table tr:hover {
  background: var(--background-base);
}

.table-actions {
  display: flex;
  gap: 8px;
}

.action-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 12px;
  cursor: pointer;
}

.action-link:hover {
  text-decoration: underline;
}

.action-link.danger {
  color: var(--danger-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
  }
  
  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-item {
    flex-direction: column;
    align-items: stretch;
  }
  
  .action-bar {
    flex-direction: column;
    gap: 10px;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--background-base);
}

::-webkit-scrollbar-thumb {
  background: var(--border-base);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}